<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
</body>
<script>
    window.addEventListener("scroll", () => {
        // 可视区域高度
        let.clientHeight = document.documentElement.clientHeight
        // 整个文档高度
        let.scrollHeight = document.documentElement.scrollHeight
        // 滚动的高度
        let.scrollTop = document.documentElement.scrollTop
        if (clientHeight + scrollTop == scrollHeight) {
            console.log("触底了");
        }
    })
</script>
<style>
    div {
        width: 700px;
        height: 100px;
        border: 1px solid #000;
    }
</style>

</html>